package sartoservicesync.utils;

import javax.xml.bind.annotation.adapters.XmlAdapter;

public class BooleanAdapter extends XmlAdapter<Integer, Boolean>{

	@Override
	public Boolean unmarshal(Integer i) throws Exception {
		 return i == null ? null : i == 1;
	}

	@Override
	public Integer marshal(Boolean i) throws Exception {
		return i == null ? null : i ? 1 : 0;
	}

}
